import request from "@/utils/request"
export function queryAccountPage(data) {
  return request({
    url: "/user/queryAccountPage",
    method: "get",
    params: data
    // pageSize pageIndex
  })
}

// 账户管理编辑接口
export function updateLAccount(data) {
  return request({
    url: "/user/updateLAccount",
    method: "POST",
    data: data
  })
}

export function updateLAccountAndPwd(data) {
  return request({
    url: "/user/updateLAccountAndPwd",
    method: "post",
    data: data
  })
}

// 账户重置密码接口
export function ResetPassword(id) {
  return request({
    url: `/user/ResetPassword`,
    method: "POST",
    data: id
  })
}
// 删除用户接口
export function deleteAccount(id) {
  return request({
    url: "/user/deleteAccount",
    method: "POST",
    data: id
  })
}
// 启用and停用
export function deactivate(id) {
  return request({
    url: `user/Deactivate`,
    method: "POST",
    data: id
  })
}

// 新增按钮接口
// POST /user/insertUser
export function insertUser(newUserData) {
  return request({
    url: "/user/insertUser",
    method: "POST",
    data: newUserData
  })
}

export function queryRole() {
  return request({
    url: "/user/queryRole",
    method: "get"
  })
}
